
cmake_minimum_required(VERSION 2.8)

project(x11rdp C)

include(GNUInstallDirs)
include(ExternalProject)
include(FindPythonInterp)
if (!PYTHONINTERP_FOUND)
        message(FATAL_ERROR "python interpreter required for building")
endif()

if (NOT X11RDP_PREFIX)
	set(X11RDP_PREFIX "/opt/X11rdp")
endif()
message(STATUS "X11RDP_PREFIX set to ${X11RDP_PREFIX}")

set(EXTERNAL_PROJECTS_BASE "${CMAKE_BINARY_DIR}/X11rdp")
set_property(DIRECTORY PROPERTY "EP_BASE" ${EXTERNAL_PROJECTS_BASE})

set(PKG_CONFIG_PATH "${X11RDP_PREFIX}/lib/pkgconfig:${X11RDP_PREFIX}/share/pkgconfig")

if(NOT "${CMAKE_INSTALL_LIBDIR}" STREQUAL "lib")
	set(PKG_CONFIG_PATH "${X11RDP_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}")
endif()

set(EXTERNAL_PROJECTS_CONFIGURE_EXTRA "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}")
list(APPEND EXTERNAL_PROJECTS_CONFIGURE_EXTRA "LDFLAGS=-Wl,-rpath=${X11RDP_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
list(APPEND EXTERNAL_PROJECTS_CONFIGURE_EXTRA "CFLAGS=-I${X11RDP_PREFIX}/include -fPIC -O2")
list(APPEND EXTERNAL_PROJECTS_CONFIGURE_EXTRA "PATH=${X11RDP_PREFIX}/bin:$ENV{PATH}")
set(COMMON_CONFIGURE_OPTS "--prefix=${X11RDP_PREFIX};--libdir=${X11RDP_PREFIX}/${CMAKE_INSTALL_LIBDIR};")


if(DEFINED X11RDP_DOWNLOAD_CACHE)
	message(STATUS "Using local download cache: ${X11RDP_DOWNLOAD_CACHE}")
endif()

set(WITH_LLVM 0)

execute_process(COMMAND "llvm-config" "--version" RESULT_VARIABLE LLVM_CONFIG_OUTPUT)

if(${LLVM_CONFIG_OUTPUT} VERSION_GREATER "3.0")
	message(STATUS "llvm detected")
	set(WITH_LLVM 1)
endif()

# Non-X11 dependencies

set(EXTERNAL_PROJECT "expat")
set(${EXTERNAL_PROJECT}_VERSION "2.0.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.gz")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://downloads.sourceforge.net/expat/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "freetype")
set(${EXTERNAL_PROJECT}_VERSION "2.4.6")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://download.savannah.gnu.org/releases/freetype/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "fontconfig")
set(${EXTERNAL_PROJECT}_VERSION "2.10.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.gz")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://fontconfig.org/release/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--disable-docs")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "freetype;expat")
list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libpng")
set(${EXTERNAL_PROJECT}_VERSION "1.6.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.gz")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://downloads.sourceforge.net/libpng/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECT})

# End of Non-X11 Dependencies

# X11 Documentation

set(EXTERNAL_PROJECTS_X11_DOCS "")

set(EXTERNAL_PROJECT "xorg-sgml-doctools")
set(${EXTERNAL_PROJECT}_VERSION "1.11")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/doc/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_DOCS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xorg-docs")
set(${EXTERNAL_PROJECT}_VERSION "1.7")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/doc/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "xorg-sgml-doctools")
#list(APPEND EXTERNAL_PROJECTS_X11_DOCS ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_DOCS})

# End of X11 Documentation

# Protocol Headers

set(EXTERNAL_PROJECTS_X11_PROTO "")

set(EXTERNAL_PROJECT "bigreqsproto")
set(${EXTERNAL_PROJECT}_VERSION "1.1.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "compositeproto")
set(${EXTERNAL_PROJECT}_VERSION "0.4.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "damageproto")
set(${EXTERNAL_PROJECT}_VERSION "1.2.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "dmxproto")
set(${EXTERNAL_PROJECT}_VERSION "2.3.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "dri2proto")
set(${EXTERNAL_PROJECT}_VERSION "2.8")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xextproto")
set(${EXTERNAL_PROJECT}_VERSION "7.2.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "fixesproto")
set(${EXTERNAL_PROJECT}_VERSION "5.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "xextproto")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "fontsproto")
set(${EXTERNAL_PROJECT}_VERSION "2.1.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "glproto")
set(${EXTERNAL_PROJECT}_VERSION "1.4.16")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "inputproto")
set(${EXTERNAL_PROJECT}_VERSION "2.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "kbproto")
set(${EXTERNAL_PROJECT}_VERSION "1.0.6")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "randrproto")
set(${EXTERNAL_PROJECT}_VERSION "1.4.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "recordproto")
set(${EXTERNAL_PROJECT}_VERSION "1.14.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "renderproto")
set(${EXTERNAL_PROJECT}_VERSION "0.11.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "resourceproto")
set(${EXTERNAL_PROJECT}_VERSION "1.2.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "scrnsaverproto")
set(${EXTERNAL_PROJECT}_VERSION "1.2.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "videoproto")
set(${EXTERNAL_PROJECT}_VERSION "2.3.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "windowswmproto")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xcmiscproto")
set(${EXTERNAL_PROJECT}_VERSION "1.2.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xf86bigfontproto")
set(${EXTERNAL_PROJECT}_VERSION "1.2.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xf86dgaproto")
set(${EXTERNAL_PROJECT}_VERSION "2.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xf86driproto")
set(${EXTERNAL_PROJECT}_VERSION "2.1.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xf86vidmodeproto")
set(${EXTERNAL_PROJECT}_VERSION "2.3.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xineramaproto")
set(${EXTERNAL_PROJECT}_VERSION "1.2.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xproto")
set(${EXTERNAL_PROJECT}_VERSION "7.0.23")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/proto/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_PROTO ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_PROTO})

# End of Protocol Headers

# X11 Utils

set(EXTERNAL_PROJECTS_X11_UTILS "")

set(EXTERNAL_PROJECT "makedepend")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/util/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_UTILS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "util-macros")
set(${EXTERNAL_PROJECT}_VERSION "1.17")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/util/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_UTILS ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_UTILS})

# End of X11 Utils


# X11 'base' Libraries
# Libs without dependencies

set(EXTERNAL_PROJECTS_X11_BASE_LIBS "")

set(EXTERNAL_PROJECT "libICE")
set(${EXTERNAL_PROJECT}_VERSION "1.0.8")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libSM")
set(${EXTERNAL_PROJECT}_VERSION "1.2.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libICE")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libFS")
set(${EXTERNAL_PROJECT}_VERSION "1.0.5")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libICE")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libpciaccess")
set(${EXTERNAL_PROJECT}_VERSION "0.13.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "util-macros")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "pixman")
set(${EXTERNAL_PROJECT}_VERSION "0.30.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--disable-gtk")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xtrans")
set(${EXTERNAL_PROJECT}_VERSION "1.2.7")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXau")
set(${EXTERNAL_PROJECT}_VERSION "1.0.7")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})


set(EXTERNAL_PROJECT "libXdmcp")
set(${EXTERNAL_PROJECT}_VERSION "1.1.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXScrnSaver")
set(${EXTERNAL_PROJECT}_VERSION "1.2.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "scrnsaverproto")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libfontenc")
set(${EXTERNAL_PROJECT}_VERSION "1.1.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXfont")
set(${EXTERNAL_PROJECT}_VERSION "1.4.5")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libfontenc;xproto;xtrans;fontsproto")
list(APPEND EXTERNAL_PROJECTS_X11_BASE_LIBS ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_BASE_LIBS})


# XCB

set(EXTERNAL_PROJECTS_X11_XCB "")

set(EXTERNAL_PROJECT "libpthread-stubs")
set(${EXTERNAL_PROJECT}_VERSION "0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/xcb/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_XCB ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xcb-proto")
set(${EXTERNAL_PROJECT}_VERSION "1.7.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/xcb/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_XCB ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libxcb")
set(${EXTERNAL_PROJECT}_VERSION "1.8.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/xcb/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "xcb-proto;libXdmcp;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_XCB ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_XCB})

# End of XCB

# X11 Libraries
set(EXTERNAL_PROJECTS_X11_LIBS "")

set(EXTERNAL_PROJECT "libX11")
set(${EXTERNAL_PROJECT}_VERSION "1.5.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.x.org/pub/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libpthread-stubs;xproto;xtrans;libxcb")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXrandr")
set(${EXTERNAL_PROJECT}_VERSION "1.3.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXrender")
set(${EXTERNAL_PROJECT}_VERSION "0.9.7")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXext")
set(${EXTERNAL_PROJECT}_VERSION "1.3.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;xextproto;libXau;libXrender")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXi")
set(${EXTERNAL_PROJECT}_VERSION "1.6.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau;inputproto")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXres")
set(${EXTERNAL_PROJECT}_VERSION "1.0.7")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau;inputproto")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXtst")
set(${EXTERNAL_PROJECT}_VERSION "1.2.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libxcb;libX11;libXi")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXv")
set(${EXTERNAL_PROJECT}_VERSION "1.0.8")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;videoproto")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXinerama")
set(${EXTERNAL_PROJECT}_VERSION "1.1.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXfixes")
set(${EXTERNAL_PROJECT}_VERSION "5.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;fixesproto")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXt")
set(${EXTERNAL_PROJECT}_VERSION "1.1.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libSM;libICE;libxcb;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXdamage")
set(${EXTERNAL_PROJECT}_VERSION "1.1.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXfixes;damageproto;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})
set(EXTERNAL_PROJECT "libXmu")
set(${EXTERNAL_PROJECT}_VERSION "1.1.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libXt;libSM;libICE;libXext;libX11;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXpm")
set(${EXTERNAL_PROJECT}_VERSION "3.5.10")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau;libXrender")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXaw")
set(${EXTERNAL_PROJECT}_VERSION "1.0.11")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libXmu;libXt;libXext;libSM;libICE;libX11;libxcb;libXau;libXpm")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXcomposite")
set(${EXTERNAL_PROJECT}_VERSION "0.4.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;compositeproto")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXcursor")
set(${EXTERNAL_PROJECT}_VERSION "1.1.14")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau;libXrender")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXft")
set(${EXTERNAL_PROJECT}_VERSION "2.3.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;fontconfig;freetype")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libXxf86vm")
set(${EXTERNAL_PROJECT}_VERSION "1.1.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXext;libXau;xf86vidmodeproto;xf86driproto;xf86dgaproto;xf86bigfontproto")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "libxkbfile")
set(${EXTERNAL_PROJECT}_VERSION "1.0.8")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/lib/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau")
list(APPEND EXTERNAL_PROJECTS_X11_LIBS ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_LIBS})

# End of X11 Libraries

# Mesa

set(EXTERNAL_PROJECTS_X11_MESA "")

set(EXTERNAL_PROJECT "libdrm")
#set(${EXTERNAL_PROJECT}_VERSION "2.4.42")
set(${EXTERNAL_PROJECT}_VERSION "2.4.45")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://dri.freedesktop.org/libdrm/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--enable-nouveau;--enable-radeon;--enable-intel")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libpthread-stubs;libpciaccess;libXrender;libXext")
list(APPEND EXTERNAL_PROJECTS_X11_MESA ${EXTERNAL_PROJECT})

#set(EXTERNAL_PROJECT "cairo")
##set(${EXTERNAL_PROJECT}_VERSION "1.12.0")
#set(${EXTERNAL_PROJECT}_VERSION "1.12.14")
#set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
#set(${EXTERNAL_PROJECT}_EXT ".tar.gz")
#set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
##set(${EXTERNAL_PROJECT}_URL "http://cairographics.org/releases/${${EXTERNAL_PROJECT}_FILE}")
#set(${EXTERNAL_PROJECT}_URL "http://pub.freerdp.com/xrdp-ng/releases/${${EXTERNAL_PROJECT}_FILE}")
#set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--enable-gl=yes;--enable-egl=yes;--enable-glx=yes")
#list(APPEND CAIRO_CONFIGURE_EXTRA )
#list(APPEND ${EXTERNAL_PROJECT}_CONFIGURE "CFLAGS=-I${X11RDP_PREFIX}/include -fPIC -O2 -L${X11RDP_PREFIX}")
#set(${EXTERNAL_PROJECT}_UPDATE "")
#set(${EXTERNAL_PROJECT}_MAKE "")
#set(${EXTERNAL_PROJECT}_DEPENDS "libdrm;libpng;pixman;freetype;fontconfig;libX11;libxcb;libXau;libXrender")
#list(APPEND EXTERNAL_PROJECTS_X11_MESA ${EXTERNAL_PROJECT})

#list(APPEND ${EXTERNAL_PROJECT}_CONFIGURE "--enable-xlib=yes;--enable-xlib-xrender=yes;--enable-xcb=yes;--enable-xcb-shm=yes")
#list(APPEND ${EXTERNAL_PROJECT}_CONFIGURE "--enable-gallium=yes;--enable-drm=yes")

set(EXTERNAL_PROJECT "MesaLib")
set(${EXTERNAL_PROJECT}_VERSION "9.1.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".zip")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "ftp://ftp.freedesktop.org/pub/mesa/${${EXTERNAL_PROJECT}_VERSION}/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-expat=${X11RDP_PREFIX};--enable-opengl;--enable-dri;--enable-glx;--enable-egl")
set(${EXTERNAL_PROJECT}_UPDATE "autoreconf;-fvi;${EXTERNAL_PROJECTS_BASE}/Source/${EXTERNAL_PROJECT}")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "expat;dri2proto;glproto;libdrm;makedepend;libxcb;libX11;libXdamage;libXfixes;libXt;libXxf86vm")
list(APPEND EXTERNAL_PROJECTS_X11_MESA ${EXTERNAL_PROJECT})

if(NOT WITH_LLVM)
	list(APPEND ${EXTERNAL_PROJECT}_CONFIGURE "--disable-gallium-egl;--disable-gallium-llvm;--with-gallium-drivers=i915,r600,swrast")
endif()

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_MESA})

# End of Mesa

# End of X11 Libraries

# X11 Server

set(EXTERNAL_PROJECTS_X11_SERVER "")

set(EXTERNAL_PROJECT "xorg-server")
set(${EXTERNAL_PROJECT}_VERSION "1.14.99.1")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/xserver/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-sha1=libcrypto;--disable-dmx;--enable-mitshm;--enable-composite;--enable-dri;--enable-dri2;--enable-glx;--enable-libdrm")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "MesaLib;libpciaccess;pixman;freetype;libfontenc;libXau;libXdmcp;libXi;xcmiscproto;bigreqsproto;randrproto;renderproto;recordproto;resourceproto;xf86driproto;libXfont")

list(APPEND EXTERNAL_PROJECTS_X11_SERVER ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_SERVER})

# End of X11 Server

# X11 Apps

set(EXTERNAL_PROJECTS_X11_APPS "")

set(EXTERNAL_PROJECT "mkfontscale")
set(${EXTERNAL_PROJECT}_VERSION "1.1.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.x.org/pub/individual/app/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libfontenc;freetype")
list(APPEND EXTERNAL_PROJECTS_X11_APPS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "mkfontdir")
set(${EXTERNAL_PROJECT}_VERSION "1.0.7")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.x.org/pub/individual/app/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "mkfontscale")
list(APPEND EXTERNAL_PROJECTS_X11_APPS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xkbcomp")
set(${EXTERNAL_PROJECT}_VERSION "1.2.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.x.org/pub/individual/app/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libxkbfile;libXau;libXdmcp")
list(APPEND EXTERNAL_PROJECTS_X11_APPS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xdriinfo")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.x.org/pub/individual/app/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libX11;libXau;libXext;libXdamage;libXfixes;libXxf86vm;libdrm;libXdmcp;MesaLib")
list(APPEND EXTERNAL_PROJECTS_X11_APPS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "bdftopcf")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.x.org/pub/individual/app/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "libXfont;freetype;libfontenc")
list(APPEND EXTERNAL_PROJECTS_X11_APPS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "intltool")
set(${EXTERNAL_PROJECT}_VERSION "0.50.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.gz")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://ftp.lfs-matrix.net/pub/blfs/conglomeration/intltool/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "")
list(APPEND EXTERNAL_PROJECTS_X11_APPS ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_APPS})

# End of X11 Apps

# X11 Fonts

set(EXTERNAL_PROJECTS_X11_FONTS "")

set(EXTERNAL_PROJECT "encodings")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-alias")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-util")
set(${EXTERNAL_PROJECT}_VERSION "1.3.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-adobe-75dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-adobe-100dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-adobe-utopia-75dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-adobe-utopia-100dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-adobe-utopia-type1")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-arabic-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bh-75dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bh-100dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bh-lucidatypewriter-75dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bh-lucidatypewriter-100dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bh-ttf")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11;--with-fc-confdir=${X11RDP_PREFIX}/etc/fonts")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bh-type1")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bitstream-75dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bitstream-100dpi")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-bitstream-type1")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-cronyx-cyrillic")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-cursor-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-daewoo-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-dec-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-ibm-type1")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-isas-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-jis-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-micro-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-misc-cyrillic")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-misc-ethiopic")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-misc-meltho")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-misc-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.1.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-mutt-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-schumacher-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.1.2")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-screen-cyrillic")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-sony-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-sun-misc")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-winitzki-cyrillic")
set(${EXTERNAL_PROJECT}_VERSION "1.0.3")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "font-xfree86-type1")
set(${EXTERNAL_PROJECT}_VERSION "1.0.4")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://xorg.freedesktop.org/releases/individual/font/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS};--with-fontrootdir=${X11RDP_PREFIX}/share/fonts/X11")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

set(EXTERNAL_PROJECT "xkeyboard-config")
set(${EXTERNAL_PROJECT}_VERSION "2.0")
set(${EXTERNAL_PROJECT}_NAME "${EXTERNAL_PROJECT}-${${EXTERNAL_PROJECT}_VERSION}")
set(${EXTERNAL_PROJECT}_EXT ".tar.bz2")
set(${EXTERNAL_PROJECT}_FILE "${${EXTERNAL_PROJECT}_NAME}${${EXTERNAL_PROJECT}_EXT}")
set(${EXTERNAL_PROJECT}_URL "http://www.x.org/releases/individual/data/xkeyboard-config/${${EXTERNAL_PROJECT}_FILE}")
set(${EXTERNAL_PROJECT}_CONFIGURE "${COMMON_CONFIGURE_OPTS}")
set(${EXTERNAL_PROJECT}_UPDATE "")
set(${EXTERNAL_PROJECT}_MAKE "")
set(${EXTERNAL_PROJECT}_DEPENDS "fontconfig;intltool")
list(APPEND EXTERNAL_PROJECTS_X11_FONTS ${EXTERNAL_PROJECT})

list(APPEND EXTERNAL_PROJECTS ${EXTERNAL_PROJECTS_X11_FONTS})

# End of X11 Fonts

foreach(EXTERNAL_PROJECT ${EXTERNAL_PROJECTS})
	message(STATUS "Adding External Project: ${EXTERNAL_PROJECT}")
	list(APPEND ${EXTERNAL_PROJECT}_CONFIGURE ${EXTERNAL_PROJECTS_CONFIGURE_EXTRA})
	
	if(DEFINED X11RDP_DOWNLOAD_CACHE)
		set(${EXTERNAL_PROJECT}_URL "${X11RDP_DOWNLOAD_CACHE}/${EXTERNAL_PROJECT}/${${EXTERNAL_PROJECT}_FILE}")
	endif()
	
	ExternalProject_Add(${EXTERNAL_PROJECT}
		URL ${${EXTERNAL_PROJECT}_URL}
		UPDATE_COMMAND ${${EXTERNAL_PROJECT}_UPDATE}
		CONFIGURE_COMMAND "${EXTERNAL_PROJECTS_BASE}/Source/${EXTERNAL_PROJECT}/configure" ${${EXTERNAL_PROJECT}_CONFIGURE}
		BUILD_IN_SOURCE 1
		BUILD_COMMAND "make" -j ${${EXTERNAL_PROJECT}_MAKE}
		DEPENDS ${${EXTERNAL_PROJECT}_DEPENDS}
		)
endforeach()

add_custom_target(x11-docs DEPENDS ${EXTERNAL_PROJECTS_X11_DOCS})
add_custom_target(x11-proto DEPENDS ${EXTERNAL_PROJECTS_X11_PROTO} x11-docs)
add_custom_target(x11-utils DEPENDS ${EXTERNAL_PROJECTS_X11_UTILS} x11-proto)
add_custom_target(x11-base-libs DEPENDS ${EXTERNAL_PROJECTS_X11_LIBS} x11-utils)
add_custom_target(x11-libs DEPENDS ${EXTERNAL_PROJECTS_X11_LIBS} x11-base-libs)
add_custom_target(x11-xcb DEPENDS ${EXTERNAL_PROJECTS_X11_XCB} x11-libs)
add_custom_target(x11-mesa DEPENDS ${EXTERNAL_PROJECTS_X11_MESA} x11-xcb)
add_custom_target(x11-xserver DEPENDS ${EXTERNAL_PROJECTS_X11_SERVER} x11-mesa)
add_custom_target(x11-fonts DEPENDS ${EXTERNAL_PROJECTS_X11_FONTS} x11-xserver)

add_custom_target(all DEPENDS x11-docs x11-proto x11-utils x11-base-libs x11-libs x11-xcb x11-mesa x11-xserver x11-fonts)

set(MAKE_ALL "make")

foreach(EXTERNAL_PROJECT ${EXTERNAL_PROJECTS})
	set(MAKE_ALL "${MAKE_ALL} ${EXTERNAL_PROJECT}")
endforeach()

message(STATUS "${MAKE_ALL}")

